package gui.typeEditors;

import java.awt.event.ActionListener;
import java.awt.event.FocusListener;

public class LongEditor extends NumberEditor<Long> implements ActionListener, FocusListener
	{
	private static final long serialVersionUID = 6195335893738468964L;

	public LongEditor(long initialValue)
		{
		super(initialValue, 1L, DEFAULT_COLUMNS, true);
		}
	
	@Override
	public Long getValue()
		{
		return (long)value;
		}

	@Override
	protected Long div(Long value, Long divisor)
	{
		return value/divisor;
	}

	@Override
	protected Long mul(Long value, Long factor)
	{
		return value*factor;
	}

	@Override
	protected Long parse(String text)
	{
		return Long.parseLong(text);
	}
	}
